﻿import request from '/@/utils/request';
enum Api {
  AddDeviceGateWay = '/api/deviceGateWay/add',
  DeleteDeviceGateWay = '/api/deviceGateWay/delete',
  UpdateDeviceGateWay = '/api/deviceGateWay/update',
  PageDeviceGateWay = '/api/deviceGateWay/page',
  DetailDeviceGateWay = '/api/deviceGateWay/detail',
  GetSysOrgTree = '/api/deviceGateWay/SysOrgTree',
}

// 增加网关信息
export const addDeviceGateWay = (params?: any) =>
	request({
		url: Api.AddDeviceGateWay,
		method: 'post',
		data: params,
	});

// 删除网关信息
export const deleteDeviceGateWay = (params?: any) => 
	request({
			url: Api.DeleteDeviceGateWay,
			method: 'post',
			data: params,
		});

// 编辑网关信息
export const updateDeviceGateWay = (params?: any) => 
	request({
			url: Api.UpdateDeviceGateWay,
			method: 'post',
			data: params,
		});

// 分页查询网关信息
export const pageDeviceGateWay = (params?: any) => 
	request({
			url: Api.PageDeviceGateWay,
			method: 'post',
			data: params,
		});

// 详情网关信息
export const detailDeviceGateWay = (id: any) => 
	request({
			url: Api.DetailDeviceGateWay,
			method: 'get',
			data: { id },
		});

export const getSysOrgTree = () =>
		request({
		url: Api.GetSysOrgTree,
		method: 'get'
		});

